document.addEventListener("DOMContentLoaded", function () {
    const animationDom = $(".animation-init");
    const $window = $(window);
    //窗口高度
    const windowH = $window.height();

    const observer = new IntersectionObserver(
        function (entrys) {
            for (const entry of entrys) {
                if (entry.intersectionRatio > 0) {
                    const element = $(entry.target);
                    console.log(entry.intersectionRatio);
                    const animationClass = element.attr("data-animation");
                    element.addClass(animationClass);
                    observer.unobserve(entry.target);
                }
            }
        },
        { threshold: [0.01] }
    );

    for (let index = 0; index < animationDom.length; index++) {
        const element = animationDom[index];
        observer.observe(element);
    }
});

$('.zuui-currency-select').val(window.oemcart_currency.standard_code)
$(".zuui-currency-select").change(function (params) {
  location.href = moi.setUrlParams(location.href, { currency: $(this).val() });
});